;3个无符号树的由大到小排序
datas segment
    buffer db 87,234,123
datas ends

codes segment
    assume cs:codes,ds:datas
start:
    mov ax,datas
    mov ds,ax

    mov si,offset buffer
    mov al,[si]
    mov bl,[si+1]
    mov cl,[si+2]

    cmp al,bl
    jae next1
    xchg al,bl
next1:
    cmp al,cl
    jae next2
    xchg al,cl
next2:
    cmp bl,cl
    jae next3
    xchg bl,cl
next3:
    mov [si],al
    mov [si+1],bl
    mov [si+2],cl
    
    mov ah,4ch
    int 21h
codes ends

end start